package jwtx

import (
	"context"
	"github.com/pkg/errors"
)

func GetClaimsFromCtx(ctx context.Context) (*CustomClaims, error) {
	if claims, ok := ctx.Value("claims").(*CustomClaims); ok {
		return claims, nil
	}
	return nil, errors.New("Failed Get CustomClaims")
}
